<template>
  <div class="crud-header-box">
    <h1>
      {{title}}
    </h1>
    <div class="right-area">
      <slot name="header"></slot>

    </div>
  </div>
</template>

<script>
  export default {
    name: 'CrudHeader',
    props: {
      title: {
        type: String,
        default: '标题',
        require: true
      }
    }
  }
</script>

<style scoped>
  h1 {
    font-size: 20px;
    font-weight: 400;
  }

  .right-area {
    float: right;
    margin-top: -30px;
  }

  .crud-header-box {
    width: 100%;
    margin: 10px auto;
    padding: 15px;
    border-bottom: 1px solid #e7ecee;
  }
</style>
